<template>
	<view class="myBoxtq">
		<view v-if="arrayResult.length>0" class="itemBox" v-for="(item,index) in arrayResult">
			<view class="leftBox">
				<view class="orderId">{{item.orderId}}</view>
				<view class="time dataBx">{{item.time | formatTime}}</view>
			</view>
			<view class="money">+{{item.value}}</view>
		</view>
		<image class="noDatabg" v-if="arrayResult.length==0" src="/static/noDatabg.png" />
	</view>
</template>

<script>
	import {
		getTotalNum
	} from "@/request/api.js";
	export default {
		data() {
			return {
				arrayResult: [
					
				],
				pageNo:1,
				pageSize:10,
				totalCount:0,
			}
		},
		onLoad(option) {
			let that = this
			that.getNumFn()
		},
		onReachBottom(){
			if(this.totalCount > this.pageNo){
				this.pageNo = this.pageNo + 1;
				this.getNumFn()
			}
		},
		methods: {
			async getNumFn() {
				let that = this
				let res = await getTotalNum({
					method: "GET",
					data: {
						pageNo:this.pageNo,
						pageSize: this.pageSize
					},
				})
				if (res.code == 200) {
					// console.log(res, 're99s3ww3333')
					let {totalCount,records} = res.result;
					that.arrayResult = records;
					that.totalCount = totalCount;
				} else {
					uni.showToast({
						title: res.message,
						icon: "none",
					});
				}
			}
		}
	}
</script>

<style lang="scss" scoped>
	.myBoxtq {
		min-height: calc(100vh - 20rpx);
		// width: 100%;
		background-color: #F6F6F6;
		box-sizing: border-box;
		padding:20rpx 30rpx;

		.itemBox {
			@include flexs(space-between, center);
			background-color: #fff;
			border-radius: 18rpx;
			padding: 20rpx 30rpx;
			align-items: center;
			margin-bottom: 20rpx;
		}

		.leftBoxClss {
			// width: 32.5%;
			text-align: center;
			border: 1px solid #f0eeeb;
			height: 80%;
			line-height: 120rpx;
			margin-right: 15rpx;
			font-size: 35rpx;
			border-radius: 6rpx;
		}

		.orderId {
			font-size:32rpx;
			font-weight: 600;
			margin-bottom:20rpx;
			// padding: 5rpx;
			// border: 1px solid #f0eeeb;
			// border-radius: 6rpx;
		}
		.time{
			font-size:22rpx;
			
		}
		.money{
			font-size: 32rpx;
			font-weight: 600;
			color:#FF0707;
		}
		.dataBx {
			margin-top: 10rpx;

		}
	}
	.noDatabg{
		position: fixed;
		top:50%;
		left:50%;
		transform: translate(-50%,-50%);
		width:750rpx;
		height:750rpx;
	}
</style>